VDPreflightDestination
You can use theVDPreflightDestination
function in your application to verify that a video digitizer component can support a set of destination settings intended for use with theVDSetPlayThruDestination
function, which is described in the previous section.
pascal VideoDigitizerError VDPreflightDestination (VideoDigitizerComponent ci, Rect *digitizerRect, PixMapHandle dest, Rect *destRect, MatrixRecord *m);
ci
- Specifies the video digitizer component for the request. Applications obtain this reference from the Component Manager's
OpenComponent
function.digitizerRect
- Contains a pointer to a rectangle that contains the size and location information for the digitizer rectangle. The coordinates of this rectangle must be relative to the maximum source rectangle. In addition, the digitizer rectangle must be within the maximum source rectangle. For a complete discussion of the relationship between these rectangles, see "About Video Digitizer Components," which begins on page 8-3.
- If the video digitizer component cannot accommodate the specified rectangle, it changes the coordinates in this structure to specify a rectangle that it can support and sets the result to
qtParamErr
.dest
- Contains a handle to the destination pixel map.
destRect
- Contains a pointer to a rectangle that specifies the size and location of the video destination. This rectangle must be in the coordinate system of the destination pixel map specified by the
dest
parameter. If the video digitizer component cannot accommodate this rectangle, it changes the coordinates in the structure to specify a rectangle that it can support and sets the result toqtParamErr
.- This is an optional parameter. Applications may specify a transformation matrix to control the placement and scaling of the video image in the destination pixel map. In this case, the
destRect
parameter is set tonil
and them
parameter specifies the matrix.m
- Contains a pointer to a matrix structure containing the transformation matrix for the destination video image. If the video digitizer component cannot accommodate this matrix, it changes the values in the structure to define a matrix that it can support and sets the result to
qtParamErr
. Applications can determine the capabilities of a video digitizer component by calling theVDGetDigitizerInfo
function, described on page 8-24.- This is an optional parameter. Applications may specify a destination rectangle to control the placement and scaling of the video image in the destination pixel map. In this case, the
m
parameter is set tonil
and thedestRect
parameter specifies the destination rectangle.- If the
destRect
parameter isnil
, you can determine the destination rectangle for simple matrices by calling theTransformRect
function using the current digitizer rectangle and this matrix. For more information onTransformRect
, see the chapter "Movie Toolbox" in Inside Macintosh: QuickTime.DESCRIPTION
The application provides the desired settings as parameters to this function. The video digitizer component then examines those settings. If the digitizer component can support the specified settings, it sets the result code tonoErr
. If the digitizer component cannot support the settings, it alters the input settings to reflect values that it can support and returns a result code ofqtParamErr
. The application can then use the settings with theVDSetPlayThruDestination
function (described in the previous section).All video digitizer components must support this function.
Applications should use the
VDPreflightDestination
function to test destination settings whenever the video digitizer component cannot support arbitrary scaling.RESULT CODES
noErr 0 No error qtParamErr -2202 Invalid parameter value SEE ALSO
Applications can determine the capabilities of a video digitizer component by examining the output capability flags (see the discussion of theVDGetCurrentFlags
function, which begins on page 8-25, for more information about retrieving these flags). Specifically, if thedigiOutDoesStretch
anddigiOutDoesShrink
flags are set to 1 in the output capability flag, the digitizer component supports arbitrary scaling.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help